package basics.files;

import java.io.File;
import javax.swing.filechooser.*;


public class CSVFilter extends FileFilter {

    //Accept all directories and csv files
    public boolean accept(File f) {
        if (f.isDirectory()) {
            return true;
        }

        if(f.getName().toLowerCase().endsWith(".csv"))
        	return true;

        return false;
    }

    //The description of this filter
    public String getDescription() {
        return "Just CSV Files";
    }
}

